/***************************************************************
*
* ALLOCATOR.H
*
* Contains interface of custom allocator.
***************************************************************/

#ifndef DS_ALLOCATOR
#define DS_ALLOCATOR

#include <list>
#include <memory>

template <typename T>
class dsALLOCATOR {
public:
               dsALLOCATOR    (void);
               dsALLOCATOR    (size_t size);
               ~dsALLOCATOR   (void);
   void        Allocate       (T *dst, T *src, size_t size);
   void        Deallocate     (T* target);
private:
   struct memBlock {
      T        *blockPtr;
      size_t    size;
      bool      isFree;
   };
   std::list<memBlock>   blocks;
   memBlock                node;
};

#include "allocator.hpp"

#endif //DS_ALLOCATOR

//
// End-of-file ALLOCATOR.H
//